﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace AchtungDieKurve
{
    public partial class Mainform : Form
    {

        public Mainform()
        {
            InitializeComponent();
        }

        private void btnBegin_Click(object sender, EventArgs e)
        {
            if (aantalCbCheckedF() < 2)
            {
                MessageBox.Show("Selecteer minimaal 2 spelers.");
            }
            else
            {
                Speelveld speelveld = new Speelveld(this);
                speelveld.Show();
                this.Hide();
            }
        }
        private int aantalCbCheckedF()
        {
            int aantalCbChecked = 0;
            if (cbSp1.Checked)
            {
                aantalCbChecked += 1;
            }
            if (cbSp2.Checked)
            {
                aantalCbChecked += 1;
            }
            if (cbSp3.Checked)
            {
                aantalCbChecked += 1;
            }
            if (cbSp4.Checked)
            {
                aantalCbChecked += 1;
            }
            return aantalCbChecked;
        }
    }
}
